<template>
  <div class="page">
    <div class="item">
      <Chart />
    </div>
    <div class="item">
      <Chart />
    </div>
    <div class="item">
      <Chart />
    </div>
    <div class="item">
      <Chart />
    </div>

    <div class="pagination">
      <el-pagination
        :current-page="currentPage"
        :page-size="20"
        layout="total, prev, pager, next, jumper"
        :total="0"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
      />
    </div>
  </div>
</template>

<script>
import Chart from '@/components/DaPingEcharts/mod10/chart'
export default {
  components: { Chart },
  data() {
    return {
      currentPage: 1
    }
  },
  methods: {
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`)
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`)
    }
  }
}
</script>

<style scoped>
.page {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
}
.item {
  width: 600px;
  height: 400px;
  transform: scale(0.9);
}
.pagination {
  width: 100%;
  text-align: center;
  margin-bottom: 50px;
}
</style>
